import request from '@/hooks/request'

const Api = {
  getChannelAreaList: '/platform/area/getChannelAreaList', // 查询票大人账户资金记录(管理员)
  getFishConfig: '/fish/config/getFishConfig', //拉取闲鱼配置
  pushConfig: '/fish/config/fishConfigPush', //推送闲鱼配置
}

export const getChannelAreaList = (parameter: Record<any, any>) => {
  const formData = new FormData()
  formData.append('parentId', parameter.parentId)
  return request({
    method: 'post',
    url: Api.getChannelAreaList,
    data: formData,
  })
}
export const getFishConfigData = (parameter: Record<any, any>) => {
  const formData = new FormData()
  formData.append('robotId', parameter.robotId)
  return request({
    method: 'post',
    url: Api.getFishConfig,
    data: formData,
  })
}
export const pushAddressConfig = (parameter: Record<any, any>) => {
  return request({
    method: 'post',
    url: Api.pushConfig,
    data: parameter,
  })
}
